﻿using System.Windows.Controls;
using System.Windows.Input;
using ParseControls;

namespace ParseOnlineAdmin
{
    /// <summary>
    /// Interaction logic for ParseRelatedComments.xaml
    /// </summary>
    public partial class ParseRelatedComments : UserControl
    {
        public ParseRelatedComments()
        {
            InitializeComponent();
        }

        private void TextBox_KeyUp(object sender, KeyEventArgs e)
        {
            if (this.txtComment.Text != string.Empty)
            {
                if (e.Key == Key.Enter)
                {
                    string text = this.txtComment.Text;

                    ParseOne.InformationSending(new ParseCustomEventArgs("Comment:New", parameter: text));

                    this.txtComment.Text = string.Empty;
                }
            }
        }
    }
}
